package o;

import androidx.annotation.Nullable;
import com.google.android.exoplayer2.source.TrackGroup;

public class akt extends aku {
    private final float ʻ;
    private final long ʼ;
    private final float ʽ;
    private final long ˊ;
    private float ˊॱ = 1.0f;
    private int ˋॱ = 1;
    private long ˏॱ = -9223372036854775807L;
    private final ams ͺ;
    private final ald ॱ;
    private int ॱˊ = ˏ(Long.MIN_VALUE);
    private final long ॱॱ;
    private final long ᐝ;

    public static final class a implements o.akz.a {
        private final float ʼ;
        private final float ˊ;
        private final int ˋ;
        private final int ˎ;
        @Nullable
        private final ald ˏ;
        private final int ॱ;
        private final long ॱॱ;
        private final ams ᐝ;

        public /* synthetic */ akz ˎ(TrackGroup trackGroup, ald o_ald, int[] iArr) {
            return ˋ(trackGroup, o_ald, iArr);
        }

        public a() {
            this(10000, 25000, 25000, 0.75f, 0.75f, 2000, ams.ॱ);
        }

        @Deprecated
        public a(ald o_ald) {
            this(o_ald, 10000, 25000, 25000, 0.75f, 0.75f, 2000, ams.ॱ);
        }

        public a(int i, int i2, int i3, float f, float f2, long j, ams o_ams) {
            this(null, i, i2, i3, f, f2, j, o_ams);
        }

        @Deprecated
        public a(@Nullable ald o_ald, int i, int i2, int i3, float f, float f2, long j, ams o_ams) {
            this.ˏ = o_ald;
            this.ˋ = i;
            this.ˎ = i2;
            this.ॱ = i3;
            this.ˊ = f;
            this.ʼ = f2;
            this.ॱॱ = j;
            this.ᐝ = o_ams;
        }

        public akt ˋ(TrackGroup trackGroup, ald o_ald, int... iArr) {
            ald o_ald2;
            if (this.ˏ != null) {
                o_ald2 = this.ˏ;
            } else {
                o_ald2 = o_ald;
            }
            return new akt(trackGroup, iArr, o_ald2, (long) this.ˋ, (long) this.ˎ, (long) this.ॱ, this.ˊ, this.ʼ, this.ॱॱ, this.ᐝ);
        }
    }

    public akt(TrackGroup trackGroup, int[] iArr, ald o_ald, long j, long j2, long j3, float f, float f2, long j4, ams o_ams) {
        super(trackGroup, iArr);
        this.ॱ = o_ald;
        this.ˊ = 1000 * j;
        this.ᐝ = 1000 * j2;
        this.ॱॱ = 1000 * j3;
        this.ʻ = f;
        this.ʽ = f2;
        this.ʼ = j4;
        this.ͺ = o_ams;
    }

    public void ˋ() {
        this.ˏॱ = -9223372036854775807L;
    }

    public void ˋ(float f) {
        this.ˊॱ = f;
    }

    public int ˎ() {
        return this.ॱˊ;
    }

    private int ˏ(long j) {
        int i = 0;
        long ˏ = (long) (((float) this.ॱ.ˏ()) * this.ʻ);
        int i2 = 0;
        while (i < this.ˋ) {
            if (j == Long.MIN_VALUE || !ˎ(i, j)) {
                if (((long) Math.round(((float) ॱ(i).ˏ) * this.ˊॱ)) <= ˏ) {
                    return i;
                }
                i2 = i;
            }
            i++;
        }
        return i2;
    }
}
